(function(){"use strict";BX.namespace("BX.Landing.MediaService");var e=BX.Landing.Utils.isString;BX.Landing.MediaService.FacebookPages=function(e,a){BX.Landing.MediaService.BaseMediaService.apply(this,arguments);this.matcher=BX.Landing.Utils.Matchers.facebookPages;this.pageUrl=encodeURIComponent(e.replace(/\/$/,""));this.embedURL="https://www.facebook.com/plugins/page.php?href="+this.pageUrl;this.params={tabs:"timeline",width:340,small_header:false,adapt_container_width:true,hide_cover:false,show_facepile:true}};BX.Landing.MediaService.FacebookPages.validate=function(e){if(e.endsWith&&(e.endsWith("facebook.com/")||e.endsWith("facebook.com"))){return false}return BX.Landing.Utils.Matchers.facebookPages.test(e)};BX.Landing.MediaService.FacebookPages.prototype={constructor:BX.Landing.MediaService.FacebookPages,__proto__:BX.Landing.MediaService.BaseMediaService.prototype,getSettingsForm:function(){if(!this.form){this.form=new BX.Landing.UI.Form.BaseForm;var a=this.getSettings();this.form.addField(new BX.Landing.UI.Field.Dropdown({title:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_SMALL_HEADER"),selector:"small_header",content:a.small_header==="true"||a.small_header===true,items:[{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_YES"),value:true},{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_NO"),value:false}]}));this.form.addField(new BX.Landing.UI.Field.Dropdown({title:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_COVER"),selector:"hide_cover",content:a.hide_cover==="true"||a.hide_cover===true,items:[{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_YES"),value:false},{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_NO"),value:true}]}));this.form.addField(new BX.Landing.UI.Field.Dropdown({title:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_FACES"),selector:"show_facepile",content:a.show_facepile==="true"||a.show_facepile===true,items:[{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_YES"),value:true},{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_NO"),value:false}]}));var i=[{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_TABS_TIMELINE"),value:"timeline"},{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_TABS_MESSAGES"),value:"messages"},{name:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_TABS_EVENTS"),value:"events"}];var t=e(a.tabs)?a.tabs.split(", "):[];if(t.length){i.forEach(function(e){e.selected=t.includes(e.value)})}this.form.addField(new BX.Landing.UI.Field.MultiSelect({title:BX.Landing.Loc.getMessage("LANDING_CONTENT_URL_MEDIA_FB_PAGE_TABS"),selector:"tabs",value:t,items:i}))}return this.form}}})();
//# sourceMappingURL=facebook_page_plugin_service.map.js